from django.conf.urls.defaults import *
import os
from cms.zblog.views import RssLatestEntries, AtomLatestEntries

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

projectPath = os.path.join(os.path.dirname(__file__), '').replace('\\','/')

feeds = {
    'rss': RssLatestEntries,
    'atom': AtomLatestEntries,
}


urlpatterns = patterns('',
    (r'^admin/(.*)', admin.site.root),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
                                    { 'document_root': projectPath + 'static' }),
 
    (r'^$', 'cms.zblog.views.latest_ten_entry'),
    (r'^search/$', 'cms.zblog.views.search'),
    (r'^zblog/', include('cms.zblog.urls')),   
    (r'^research/$', 'django.views.generic.simple.direct_to_template', {'template': 'research.html'}),
    (r'^contact/$', 'django.views.generic.simple.direct_to_template', {'template': 'contact.html'}),
    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),

)

